<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div>
        发送验证码；
    </div>
    <input type="number">
    <button>发送</button>
</body>
<script>
    var buttonDom = document.querySelector('button');
    var time=60;

    buttonDom.onclick = function(){
        buttonDom.disabled=true;
        buttonDom.innerText=time;
        var interval=setInterval(function(){
            time--;
            buttonDom.innerHTML = time+'秒后重新发送';
            if(time==0){
            buttonDom.disabled=false;
            buttonDom.innerText="发送";
            time = 60;
            clearInterval(interval);
        }
        },1000);
        
    }
</script>
</html>